package com.leff.cards.web.requests;

import android.util.Log;

import com.leff.cards.util.Secrets;
import com.leff.cards.util.Dictionary;
import com.leff.cards.util.Settings;
import com.leff.cards.web.WebRequest;

public class GcmRegisterRequest extends WebRequest implements Secrets {

	public GcmRegisterRequest(long id, String token) {
		super(WebCommand.REGISTER_DEVICE);
		
		mParameters.put(Parameter.ID, id);
		mParameters.put(Parameter.GCM_ID, token);
	}

	@Override
	protected void parseResultDictionary(Dictionary dict) {
		Log.v(TAG, "Successfully registered device token");
		
		Settings.setNotificationsEnabled(true);
	}
}
